package com.effectivsocial.service.impl;

import java.util.List;

import javax.inject.Inject;
import javax.inject.Named;

import org.springframework.transaction.annotation.Transactional;

import com.effectivsocial.domain.Link;
import com.effectivsocial.repository.LinkRepository;
import com.effectivsocial.service.api.AbstractService;
import com.effectivsocial.service.api.LinkService;

@Named
@Transactional(readOnly = true)
public class LinkServiceImpl extends AbstractService<Link, String> implements
		LinkService {
	@Inject
	private LinkRepository repository;

	@Override
	protected void initInternal() {
		setRepository(repository);
	}

	public List<Link> findAll() {
		return repository.findAll();
	}

	public Link findByName(String name) {
		return repository.findByName(name);
	}
}
